package com.fileshare.web.entity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.*;

import java.util.Date;

import static com.fileshare.web.constant.EntityConstant.*;

/**
 * 下载记录
 */
@Table(name = "download_log")
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DownloadLog {
    @Column(name = "id", type = MySqlTypeConstant.INT, length = 11, isKey = true, isAutoIncrement = true)
    private Integer id;

    @Column(name = "reference_key", type = MySqlTypeConstant.VARCHAR, length = KEY_LEN)
    private String referenceKey;

    @Column(name = "reference_value", type = MySqlTypeConstant.VARCHAR, length = SEQ_LEN)
    private String referenceValue;

    @Column(name = "ip_address", type = MySqlTypeConstant.VARCHAR, length = IP_ADDR_LEN)
    private String ipAddress;

    @Column(name = "create_at", type = MySqlTypeConstant.DATETIME)
    private Date createAt;

    @Column(name = "update_at", type = MySqlTypeConstant.DATETIME)
    private Date updateAt;

    @Column(name = "create_by", type = MySqlTypeConstant.CHAR, length = SEQ_LEN)
    private String createBy;

    @Column(name = "update_by", type = MySqlTypeConstant.CHAR, length = SEQ_LEN)
    private String updateBy;
}
